package com.example.tijianserver.controller;


import com.example.tijianserver.pojo.Cireport;
import com.example.tijianserver.pojo.Overallresult;
import com.example.tijianserver.response.ApiRestResponse;
import com.example.tijianserver.service.OverallResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/OverallResult")
public class OverallResultController {
	@Autowired
	OverallResultService overallResultService;

	@RequestMapping("/getOverallResultById")
	public ApiRestResponse getOverallResultById(@RequestBody Overallresult overallResult){

		return ApiRestResponse.success(overallResultService.getOverallResultById(overallResult));
	}

	@RequestMapping("/getReportByOrderId")
	public ApiRestResponse getReportByOrderId(@RequestBody Cireport ciReport){
		return ApiRestResponse.success(overallResultService.getReportByOrderId(ciReport));
	}

	@RequestMapping("/getNameByCiId")
	public ApiRestResponse getNameByCiId(@RequestBody Cireport ciReport){
		System.out.println("运行中");
		return ApiRestResponse.success(overallResultService.getReportDetailByCiId(ciReport));
	}





}
